package com.bpf.base.util;

import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {
	public String getValueByKey(String key) {
		Properties props = new Properties();
		InputStream in;
		try {
			in = getClass().getResourceAsStream("/application.properties");
			props.load(in);
			return props.get(key).toString();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;

	}

	public static void main(String[] args) {
		PropertiesUtil p = new PropertiesUtil();
		p.getValueByKey("title");
	}
}
